#!/bin/sh
starttime=
dosedbasex=
dosedbasey=
dosedbasecx=
dosedbasecy=

sectionname=$(echo $0 | cut -d '/' -f 3 | cut -d '_' -f 1 | sed 's/^ADBRUN//')
adbclient=$(uci get adbrun.$sectionname.adbiplist)
rm /tmp/adb_ADBRUN${sectionname}_.sh

adb connect ${adbclient}:5555

while true
do
	rtime=$(expr $(date +%s | cut -c 10) + 1)
	rx=$(expr $basex + $rtime)
	ry=$(expr $basey + $rtime)
	adb -s ${adbclient}:5555 shell input swipe ${rx} ${ry} $(expr ${rx} + 10) $(expr ${ry} - 390)
	sleep $(expr $rtime + 12)
done

